<?php

class Promocionescines extends CI_Controller{
    
       public function __construct() {
        parent::__construct();

        $this->load->helper('url');
        $this->load->model('promoscines_model');
        $this->load->model('salas_model');

    }
    
    public function index() {

   
        $this->cines();
        
    }
    
    
    public function cines() {
        $data['promociones_sala'] = $this->promoscines_model->get_promos();
         $data['salas'] = $this->salas_model->get_salas();
     

        $data['title'] = "Viendo promociones de cines";

         if (count($data['promociones_sala']) > 0) {

            $this->load->view('templates/header', $data);

            $this->load->view('promociones/cines', $data);
        
            $this->load->view('templates/footer', $data);
        } else {
            echo "vista no encontrada";
            show_404();
        }
}
    




}

?>
